Java generics and collections

نویسندگان

  • Maurice Naftalin
  • Philip Wadler
چکیده

class Fruit implements Comparable { protected String name; protected int size; protected Fruit(String name, int size) { this.name = name; this.size = size; } public boolean equals(Object o) { if (o instanceof Fruit) { Fruit that = (Fruit)o;

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Eecs (eecs)

EECS 132. Introduction to Programming in Java. 3 Units. Introduction to computer programming and problem solving with the Java language. Computers, operating systems, and Java applications; software development; conditional statements; loops; methods; arrays; classes and objects; object-oriented design; unit testing; strings and text I/O; inheritance and polymorphism; GUI components; applicatio...

متن کامل

Eecs (eecs)

EECS 132. Introduction to Programming in Java. 3 Units. Introduction to computer programming and problem solving with the Java language. Computers, operating systems, and Java applications; software development; conditional statements; loops; methods; arrays; classes and objects; object-oriented design; unit testing; strings and text I/O; inheritance and polymorphism; GUI components; applicatio...

متن کامل

Some Examples of Generics in Java 1.5

The forthcoming releases of Java JDK v1.5 and C# v2.0 support generic classes (classes with generic type parameters) and generic methods. Furthermore, each also supports constrained generic types. Much has been written about generic types. In " A Comparative Study of Language Support for Generic Programming " by Garcia et al details of generic types and programming in C++, Haskell, Standard ML,...

متن کامل

MultiJava, JML, and Generics

The goal of this semester project is to extend the already existing support for generics in the MultiJava compiler by implementing special features of Java generics on top of it, namely wildcards and raw types, while also making the necessary modifications to JML. To that end, we will give a brief overview of Java generics and describe the main design decisions behind its specification before p...

متن کامل

Efficiently Refactoring Java Applications to Use Generic Libraries

Java 1.5 generics enable the creation of reusable container classes with compiler-enforced type-safe usage. This eliminates the need for potentially unsafe down-casts when retrieving elements from containers. We present a refactoring that replaces raw references to generic library classes with parameterized references. The refactoring infers actual type parameters for allocation sites and decla...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006